using System;
using System.Collections.Generic;
using System.Text;

namespace Spacedash.Logic.RaceStates
{
    /// <summary>
    /// State of a race when it's loading the scenario, textures, etc.
    /// It hasn't any kind of logic, simply it changes the state on the first frame, but the graphics could use
    /// this state information to show a loading screen etc.
    /// </summary>
    public class LoadingRaceState:RaceState
    {
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="race">Race instance</param>
        public LoadingRaceState(Race race) : base(race) { }
        /// <summary>
        /// \internal Sets the race state to StartingRaceState
        /// </summary>
        public override void Update()
        {
            race.State = new StartingRaceState(race);
        }
        /// <summary>
        /// \internal State identifier
        /// </summary>
        public override RaceStateList State
        {
            get { return RaceStateList.Loading; }
        }
    }
}
